<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04_DOM操作</title>
</head>
<body>
<button onclick="addMoney()">
    点我变富
</button>
<hr>

<script>
    const addMoney =()=>{
        let imgE=document.createElement('img');
        console.log(imgE);
        imgE.src='img/money.jpg';
        imgE.width=200;
        let bodyE=document.querySelector('body');
        bodyE.append(imgE);
    }
    function addMoney2(){
        let imgE=document.createElement('img');
        imgE.src='img/money.jpg';
        imgE.width=200;
        console.log(imgE);
    }
    let addMoney3 = function (){
        let imgE=document.createElement('img');
        imgE.src='img/money.jpg';
        imgE.width=200;
        console.log(imgE);
    }
</script>
</body>
</html>